import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;
import java.io.IOException;
@WebFilter
public class MyFilter2 implements Filter {
    public void inti(FilterConfig filterConfig) throws ServletException {
        System.out.println("过滤器2init");
    }

    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("过滤器2doFilter");
        System.out.println("MyFilter 旅行前逻辑");
        filterChain.doFilter(servletRequest, servletResponse);
        System.out.println("MyFilter2 旅行后逻辑");
    }

    public void destroy()

    {
        System.out.println("过滤器2destroy");
    }
}
